home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / tools / make / tcmak / makemak.txt < prev    next >
Encoding:
Text File  |  1988-06-22  |  2.2 KB  |  56 lines

  1. /*
  2. makemak.c --    
  3.  
  4. This program will generate a make file suitable for use
  5. with Microsoft C or MASM. It makes an array of the names
  6. of all the files in the current directory. It than searches
  7. through the array for files that have an extension of C or
  8. ASM. If so, it prints a make style "filename.obj: filename.c"
  9. dependancy line. It then searches through the file to see if
  10. any local include files are specified. If    so, they are also
  11. specified in the dependancy list. Finally, the link line is
  12. printed.
  13.  
  14. Several make macro definitions are also printed. The source
  15. of these definitions can come from several places. First, a
  16. set of default definitions are built into the program. Second,
  17. three environment variables, "CL, LINK, and MASM" are checked
  18. and any values there become macro definitions. Lastly, a
  19. configuration file is checked and any definitions there will
  20. be included. This last set will override any definitions
  21. set internally or from the environment.
  22.  
  23. Now for the caveats. 1) THIS THING IS BY NO MEANS PERFECT.
  24. 2) I have found that it will perform acceptably with little
  25. to    no editing of the generated make file. You may or may not
  26. find this to be the case. It will be a function of your own
  27. programming style and needs. 3) It requires that each program
  28. that you generate a make file for has it's own directory.
  29. If you do not use a seperate directory for each program, you
  30. run the risk of having a large number of source and object
  31. files    in your dependancy lists that are not related to the
  32. program you are trying to make. 4) You get what you pay for.
  33.  
  34. makemak allows the following flags;
  35.  
  36.     -d        show a dependency tree similar to "make' expects
  37.     -s        show times.  Display last modified times of files.
  38.     -v        verbose.  Running commentary during file parsing.
  39.     -h,H        show a brief list of options
  40.  
  41. Much of this program is based on an article by Dave Taylor in the February,
  42. 1988 issue of Computer Language. It has been extensively modified for DOS.
  43. The getopt function is from Augie Hansen's book "Proficient C".
  44.  
  45. Compiled under Microsoft C 5.0
  46. */
  47.  
  48. /*    Last revised : Sun February 21, 1988 at 10:25:36 pm*/
  49. /* Loran W. Richardson
  50. 7083 Fairways Drive
  51. Longmont, CO 80501
  52. (303) 939-9743
  53. CIS 70441,3037
  54. */
  55.  
  56.